home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / man / cat.3 / RestrictEv.3 < prev    next >
Text File  |  1995-07-25  |  6KB  |  133 lines

  1.  
  2.  
  3.  
  4.      TTTTkkkk____RRRReeeessssttttrrrriiiiccccttttEEEEvvvveeeennnnttttssss((((3333))))         TTTTkkkk (((( ))))          TTTTkkkk____RRRReeeessssttttrrrriiiiccccttttEEEEvvvveeeennnnttttssss((((3333))))
  5.  
  6.  
  7.  
  8.      _________________________________________________________________
  9.  
  10.      NNNNAAAAMMMMEEEE
  11.           Tk_RestrictEvents - filter and selectively delay X events
  12.  
  13.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  14.           ####iiiinnnncccclllluuuuddddeeee <<<<ttttkkkk....hhhh>>>>
  15.  
  16.           Tk_RestrictProc *
  17.           TTTTkkkk____RRRReeeessssttttrrrriiiiccccttttEEEEvvvveeeennnnttttssss(_p_r_o_c, _a_r_g, _p_r_e_v_A_r_g_P_t_r)
  18.  
  19.      AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  20.           Tk_RestrictProc   *_p_r_o_c          (in)      Predicate
  21.                                                      procedure to call
  22.                                                      to         filter
  23.                                                      incoming        X
  24.                                                      events.      NULL
  25.                                                      means    do   not
  26.                                                      restrict   events
  27.                                                      at all.
  28.  
  29.           char              *_a_r_g           (in)      Arbitrary
  30.                                                      argument  to pass
  31.                                                      to _p_r_o_c.
  32.  
  33.           char              **_p_r_e_v_A_r_g_P_t_r   (in/out)  Pointer to  place
  34.                                                      to  save argument
  35.                                                      to       previous
  36.                                                      restrict
  37.                                                      procedure.
  38.      _________________________________________________________________
  39.  
  40.  
  41.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  42.           This  procedure  is  useful  in  certain  situations   where
  43.           applications  are only prepared to receive certain X events.
  44.           After TTTTkkkk____RRRReeeessssttttrrrriiiiccccttttEEEEvvvveeeennnnttttssss is called, TTTTkkkk____DDDDooooOOOOnnnneeeeEEEEvvvveeeennnntttt (and  hence
  45.           TTTTkkkk____MMMMaaaaiiiinnnnLLLLoooooooopppp)  will filter X input events through _p_r_o_c.  _P_r_o_c
  46.           indicates  whether  a  given  event  is  to   be   processed
  47.           immediately or deferred until some later time (e.g. when the
  48.           event  restriction  is  lifted).   _P_r_o_c  is  a  standard   X
  49.           predicate  procedure,  of  the sort passed to XXXXCCCChhhheeeecccckkkkIIIIffffEEEEvvvveeeennnntttt.
  50.           It must have  arguments  and  result  that  match  the  type
  51.           TTTTkkkk____RRRReeeessssttttrrrriiiiccccttttPPPPrrrroooocccc:
  52.                typedef Bool Tk_RestrictProc(
  53.                     Display *_d_i_s_p_l_a_y,
  54.                     XEvent *_e_v_e_n_t_P_t_r,
  55.                     char *_a_r_g);
  56.           The _d_i_s_p_l_a_y argument to  _p_r_o_c  is  the  display  from  which
  57.           _e_v_e_n_t_P_t_r was received, and _e_v_e_n_t_P_t_r points to an event under
  58.           consideration.  The _a_r_g argument is a copy of the _a_r_g passed
  59.           to  TTTTkkkk____RRRReeeessssttttrrrriiiiccccttttEEEEvvvveeeennnnttttssss;   it may be used to provide _p_r_o_c with
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 7/23/95)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      TTTTkkkk____RRRReeeessssttttrrrriiiiccccttttEEEEvvvveeeennnnttttssss((((3333))))         TTTTkkkk (((( ))))          TTTTkkkk____RRRReeeessssttttrrrriiiiccccttttEEEEvvvveeeennnnttttssss((((3333))))
  71.  
  72.  
  73.  
  74.           information it needs to filter  events.   _P_r_o_c  must  return
  75.           TTTTrrrruuuueeee  or  FFFFaaaallllsssseeee.   TTTTrrrruuuueeee  means the event should be processed
  76.           immediately  and  FFFFaaaallllsssseeee  means  the  event  should  not   be
  77.           processed now, but should be saved for some later time.
  78.  
  79.           TTTTkkkk____RRRReeeessssttttrrrriiiiccccttttEEEEvvvveeeennnnttttssss uses its return value  and  _p_r_e_v_A_r_g_P_t_r  to
  80.           return  information  about  the  current  event  restriction
  81.           procedure (a NULL return value means there are currently  no
  82.           restrictions).   These  values  may  be  used to restore the
  83.           previous restriction state when there is no longer any  need
  84.           for the current restriction.
  85.  
  86.           There are very few places where TTTTkkkk____RRRReeeessssttttrrrriiiiccccttttEEEEvvvveeeennnnttttssss is needed.
  87.           Please  use  it  only  where it is absolutely necessary.  If
  88.           only a local restriction  is  needed,  it  can  probably  be
  89.           achieved  more  cleanly by changing event-to-Tcl bindings or
  90.           by calling TTTTkkkk____DDDDeeeelllleeeetttteeeeEEEEvvvveeeennnnttttHHHHaaaannnnddddlllleeeerrrr.
  91.  
  92.  
  93.      KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
  94.           delay, event, filter, restriction
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 7/23/95)
  130.  
  131.  
  132.  
  133.